define(['../module'], function (services) {
    "use strict";
    services.factory('loginFactory', ['$http','urlBase', function ($http,urlBase) {

        $http.defaults.useXDomain = true ;
//     var url_prefix = 'http://10.188.199.4:8080/YIXUN_1.5_WEB/';
//        var url_prefix = 'http://10.188.192.200:8080/finance/';

        var loginFactory = {};
//        console.log('http:'+$http);

        loginFactory.doLogin = function (user) {
            var path = urlBase + 'login/doLogin';
            return $http.post(path, user);
        };

        loginFactory.logout = function () {
            var path = url_prefix + 'login/logout';
            return $http.post(path);
        };

        return loginFactory;
    }]);
});